home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / refex / ex18.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  422 b   |  23 lines

  1. Program Example18;
  2.  
  3. { Program to demonstrate the Eof function. }
  4.  
  5. Var T1,T2 : text;
  6.     C : Char;
  7.  
  8. begin
  9.   { Set file to read from. Empty means from standard input.}
  10.   assign (t1,paramstr(1));
  11.   reset (t1);
  12.   { Set file to write to. Empty means to standard output. }
  13.   assign (t2,paramstr(2));
  14.   rewrite (t2);
  15.   While not eof(t1) do
  16.     begin
  17.     read (t1,C);
  18.     write (t2,C);
  19.     end;
  20.   Close (t1);
  21.   Close (t2);  
  22. end.
  23.